import os,json
def main(data_path):
    with open(os.path.join(data_path, 'annotations.json')) as f:
        data_dict = json.load(f)
    tar_dplit_dict={
        'train':[],'val':[],'test':[]
    }
    for image_name in data_dict:
        tar_dplit_dict['test'].append(image_name)
    os.makedirs(os.path.join(data_path, 'split'), exist_ok=True)
    with open(os.path.join(data_path, 'split', 'all.json'), 'w') as f:
        json.dump(tar_dplit_dict, f)
if __name__ == '__main__':
    data_path = '/mnt/d/Workspace/MiniReti/'  
    main(data_path)